home *** CD-ROM | disk | FTP | other *** search
/ Kit PC World De Ampliacion De Windows 95 / Kit PC World de ampliacion de Windows 95.iso / internet / sweeper / samples / olecon~1 / controls / autosa~1 / rectan~1.h < prev    next >
Text File  |  1995-11-25  |  2KB  |  80 lines

  1. //=--------------------------------------------------------------------------=
  2. // RectangleObj.H
  3. //=--------------------------------------------------------------------------=
  4. // Copyright  1995  Microsoft Corporation.  All Rights Reserved.
  5. //
  6. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF 
  7. // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO 
  8. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 
  9. // PARTICULAR PURPOSE.
  10. //=--------------------------------------------------------------------------=
  11. //
  12. // the Rectangle object.
  13. //
  14. //
  15. #ifndef _RECTANGLE_H_
  16.  
  17. #include "AutoObj.H"
  18. #include "AutoSampleInterfaces.H"
  19.  
  20. class CRectangle : public IRectangle, public CAutomationObject, ISupportErrorInfo {
  21.  
  22.   public:
  23.     // IUnknown methods
  24.     //
  25.     DECLARE_STANDARD_UNKNOWN();
  26.  
  27.     // IDispatch methods
  28.     //
  29.     DECLARE_STANDARD_DISPATCH();
  30.  
  31.     //  ISupportErrorInfo methods
  32.     //
  33.     DECLARE_STANDARD_SUPPORTERRORINFO();
  34.  
  35.     CRectangle(IUnknown *);
  36.     virtual ~CRectangle();
  37.  
  38.     // IRectangle methods
  39.     // TODO: copy over the interface methods for IRectangle from
  40.     //       AutoSampleInterfaces.H here.
  41.     //
  42.     STDMETHOD(get_Bottom)(long * plBottom) ;
  43.     STDMETHOD(put_Bottom)(long lBottom) ;
  44.     STDMETHOD(get_Left)(long * plLeft) ;
  45.     STDMETHOD(put_Left)(long lLeft) ;
  46.     STDMETHOD(get_Right)(long * plRight) ;
  47.     STDMETHOD(put_Right)(long lRight) ;
  48.     STDMETHOD(get_Top)(long * plTop) ;
  49.     STDMETHOD(put_Top)(long lTop) ;
  50.  
  51.  
  52.     // creation method
  53.     //
  54.     static IUnknown *Create(IUnknown *);
  55.  
  56.   protected:
  57.     virtual HRESULT InternalQueryInterface(REFIID riid, void **ppvObjOut);
  58.  
  59.   private:
  60.     // member variables that nobody else gets to look at.
  61.     // TODO: add your member variables and private functions here.
  62.     //
  63.     RECTL m_rect;
  64. };
  65.  
  66. // TODO: modify anything appropriate in this structure, such as the helpfile
  67. //       name, the version number, etc.
  68. //
  69. DEFINE_AUTOMATIONOBJECT(Rectangle,
  70.     &CLSID_Rectangle,
  71.     "Rectangle",
  72.     CRectangle::Create,
  73.     1,
  74.     &IID_IRectangle,
  75.     "Rectangle.Hlp");
  76.  
  77.  
  78. #define _RECTANGLE_H_
  79. #endif // _RECTANGLE_H_
  80.